<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <!--{include file='comm/header.tpl'}-->
    <title>微信互动活动列表</title>
    <!--{include file='comm/comm_cal.tpl'}-->
</head>
<body>

<style>

#addBox tr th{
border-collapse: collapse;
background-color: #EAEAEA;
border: 1px solid #CCCCCC;
height:28px;
text-align: center;
}

#addBox tr td{
border: 1px solid #CCCCCC;
padding:3px;
}

.input-group .form-control {
    margin-bottom: 0;
    width: 600px;
}

.input-group-radio {

    width: 600px;
}

</style>

<!--{include file='comm/naviBanner.tpl'}-->

<div class="ebsig_container">

    <!--{include file='comm/menu.tpl'}-->
    <div class="comm_crub">
        <span class="now_crub">微信互动活动列表</span>
    </div>
    <div class="comm_content">

            <div  class="search-box">
                <form id="searchForm" name="searchForm" onsubmit="return false;">
                    <div style="position:relative">
                        <span>
                            活动名称：<input type="text" id="promotionName" name="promotionName" style="width: 150px;" />
                        </span>
                        <span>
                            活动类型：
                            <select name="promotionType" id="promotionType">
                                <option value="">请选择</option>
                                <option value="1">刮刮卡</option>
                                <option value="2">摇一摇</option>
                                <option value="3">大转盘</option>
                                <option value="4">盖高楼</option>
                                <option value="5">接红包</option>
                            </select>
                        </span>
                        <span>
                            活动时间：<input type="text" id="startDate" name="startDate" readonly="readonly" style="width: 120px;" />
                            ～
                            <input type="text" id="endDate" name="endDate" readonly="readonly" style="width: 120px;" />
                        </span>
                        <span>
                            是否可使用积分换：<select name="isPointsExchange" id="isPointsExchange">
                                <option value="3">请选择</option>
                                <option value="1">是</option>
                                <option value="0">否</option>
                            </select>
                        </span>
                        <span>
                            <input type="button" class="btn" value="查询" onclick="scratch.search();">&nbsp;&nbsp;
                            <input type="button" class="btn" value="重置" onclick="scratch.clear();">
                        </span>
                    </div>
                </form>
            </div>

            <table id="flex" style="display:none"></table>

        </div>

</div>

<script type="text/javascript">

$('#startDate').datetimepicker();
$('#endDate').datetimepicker();

var mark = 0;

var datacache = new Array();

var table_obj = {'page' : '', 'total' : '', 'rows' : []};

    $("#flex").flexigrid({
        type: "POST",
        url:"/invokingAjax-backend/promotion/scratch.ajax?operFlg=1&xjx=none",
        dataType: "json",
        colModel : [
            <!--{if $edit_permission}-->
            {display: "操作", width : 200, align: "center"},
            <!--{/if}-->
            {display: "活动名称", width : 150, align: 'left'},
            {display: "活动类型", width : 150, align: 'left'},
            {display: "开始日期", width : 120, align: 'center'},
            {display: "结束日期", width : 120, align: 'center'},
            {display: "每日可参加的次数", width : 100, align: 'left'},
            {display: "是否可使用积分换", width : 100, align: 'center'},
            {display: "扣除积分", width : 80, align : 'left'},
            {display: "最多可换的次数", width : 100, align : 'left'},
            {display: "领奖结束日期", width : 120, align : 'center'},
            {display: "使用状态", width : 100, align : 'center'}
        ],
        <!--{if $edit_permission}-->
        buttons : [
            {name: "添加", bclass: "add", onpress : "scratch.openHTML.add"}
        ],
        <!--{/if}-->
        sortname: "createTime",
        sortorder: "desc",
        usepager: true,
        rp: 10,
        useRp: true,
        showTableToggleBtn: true
    });

    var scratch = {

        openHTML: {

            awardSet: function(){

                $('#start_Date').datetimepicker();
                $('#end_Date').datetimepicker();
                $('#acceptEndDate').datetimepicker();

                $('#ggkname').on('focus', function() {
                    var ggkname = $(this).val();
                    if (ggkname == '奖项名称') {
                        $(this).val('');
                    }
                }).on('blur', function() {
                            var ggkname = $(this).val();
                            if (ggkname == '') {
                                $(this).val('奖项名称');
                                $(this).css('opacity',0.5);
                            }else{
                                $(this).css('opacity',1);
                            }
                        });

                $('#awardsRatio').on('focus', function() {
                    var ggkname = $(this).val();
                    if (ggkname == '概率') {
                        $(this).val('');
                    }
                }).on('blur', function() {
                            var ggkname = $(this).val();
                            if (ggkname == '') {
                                $(this).val('概率');
                                $(this).css('opacity',0.5);
                            }else{
                                $(this).css('opacity',1);
                            }
                        });

                $('#djcp').on('focus', function() {
                    var djcp = $(this).val();
                    if (djcp == '奖品名称') {
                        $(this).val('');
                    }
                }).on('blur', function() {
                            var djcp = $(this).val();
                            if (djcp == '') {
                                $(this).val('奖品名称');
                                $(this).css('opacity',0.5);
                            }else{
                                $(this).css('opacity',1);
                            }
                        });


                $('#pnum').on('focus', function() {
                    var pnum = $(this).val();
                    if (pnum == '奖品数量') {
                        $(this).val('');
                    }
                }).on('blur', function() {
                            var pnum = $(this).val();
                            if (pnum == '') {
                                $(this).val('奖品数量');
                                $(this).css('opacity',0.5);
                            }else{
                                $(this).css('opacity',1);
                            }
                        });

            },

            edit: function(promotionID){

                table_obj.rows = new Array();

                E.ajax_post({
                    url: '/invokingAjax-backend/promotion/scratch.ajax?operFlg=8',
                    data: {'promotionID':promotionID},
                    call: "scratch.openHTML.resultEdit"
                });

            },

            resultEdit:function(o){

                console.log(o);

                if(o.promotionType == 1){
                    var htmlOption = '<option  value="">请选择</option>' +
                            '<option selected="selected"  value="1">刮刮卡</option>' +
                            '<option  value="2">摇一摇</option>' +
                            '<option  value="3">大转盘</option>' +
                            '<option  value="4">盖高楼</option>' +
                            '<option  value="5">接红包</option>';
                }

                if(o.promotionType == 2){
                    var htmlOption = '<option  value="">请选择</option>' +
                            '<option   value="1">刮刮卡</option>' +
                            '<option selected="selected"  value="2">摇一摇</option>' +
                            '<option  value="3">大转盘</option>' +
                            '<option  value="4">盖高楼</option>' +
                            '<option  value="5">接红包</option>';
                }

                if(o.promotionType == 3){
                    var htmlOption = '<option  value="">请选择</option>' +
                            '<option   value="1">刮刮卡</option>' +
                            '<option   value="2">摇一摇</option>' +
                            '<option selected="selected"  value="3">大转盘</option>' +
                            '<option  value="4">盖高楼</option>' +
                            '<option  value="5">接红包</option>';
                }

                if(o.promotionType == 4){
                    var htmlOption = '<option  value="">请选择</option>' +
                            '<option   value="1">刮刮卡</option>' +
                            '<option   value="2">摇一摇</option>' +
                            '<option   value="3">大转盘</option>' +
                            '<option selected="selected"  value="4">盖高楼</option>' +
                            '<option  value="5">接红包</option>';
                }

                if(o.promotionType == 5){
                    var htmlOption = '<option  value="">请选择</option>' +
                            '<option   value="1">刮刮卡</option>' +
                            '<option   value="2">摇一摇</option>' +
                            '<option   value="3">大转盘</option>' +
                            '<option   value="4">盖高楼</option>' +
                            '<option selected="selected"  value="5">接红包</option>';
                }



                var title = '微信互动活动编辑';

                E.popup.open({
                    id:'scratchAdd',
                    title: title, //弹出标题，不传则默认为“提示信息”【可选】
                    //content: h,    //显示内容（html代码），不传则默认为空【可选】
                    btnName: "提交", //“确认”按钮，不传则不显示
                    btnCall: "scratch.openHTML.check('"+ o.promotionID+"')"//点击“确认”按钮触发的函数/方法
                });

                if(o.isPointsExchange == 1){
                    var radio = '<div>' +
                            '<input checked="checked" onclick="scratch.openHTML.actionShow()" type="radio" name="is_PointsExchange" value="1">&nbsp;是&nbsp;' +
                            '<input onclick = "scratch.openHTML.actionHide()" type="radio" name="is_PointsExchange"  value="0">&nbsp;否' +
                            '</div>';
                    $('#maxNum').css('display','');
                    $('#integral').css('display','');
                    $('#maxExchangeTime').val(o.maxExchangeTime);
                    $('#point').val(o.points);
                }else{
                    var radio = '<div>' +
                            '<input onclick="scratch.openHTML.actionShow()" type="radio" name="is_PointsExchange" value="1">&nbsp;是&nbsp;' +
                            '<input onclick = "scratch.openHTML.actionHide()" type="radio" name="is_PointsExchange" checked="checked" value="0">&nbsp;否' +
                            '</div>';
                    $('#maxNum').css('display','none');
                    $('#integral').css('display','none');
                    $('#maxExchangeTime').val('');
                    $('#point').val('');
                }

                $('#promotion_Type').val(htmlOption);
                $('#promotion_Name').val(o.promotionName);
                $('#promotion_Type').val(o.promotionType);
                $('#start_Date').val(o.startDate);
                $('#end_Date').val(o.endDate);
                $('#participateTime').val(o.participateTime);
                $('#acceptEndDate').val(o.acceptEndDate);
                $('#pchang').html(radio);

                scratch.openHTML.awardSet();

                $.each(o.promotion_detail,function(k,v){

                    mark++;
                    table_obj.rows.push({'id':mark,'cell':[v.awardsName,v.awardsRatio+'/'+v.awardsRate,v.prize,v.prizeNum]});

                });

                var html = '<table id="addBox" style="border-collapse: collapse;width:90%">' +
                        '<tr>' +
                        '<th style="width:20%">' +
                        '奖项名称' +
                        '</th>' +
                        '<th style="width:20%">' +
                        '概率' +
                        '</th>' +

                        '<th style="width:20%">' +
                        '奖品名称' +
                        '</th>' +

                        '<th style="width:20%">' +
                        '奖品数量' +
                        '</th>' +

                        '<th style="width:20%">' +
                        '操作' +
                        '</th>' +

                        '</tr>';

                $.each(table_obj.rows,function(k,v){
                    html += '<tr>' +
                            '<td>' +
                            v.cell[0] +
                            '</td>' +
                            '<td>' +
                            v.cell[1] +
                            '</td>' +
                            '<td>' +
                            v.cell[2] +
                            '</td>' +
                            '<td>' +
                            v.cell[3] +
                            '</td>' +
                            '<td align="center">' +
                            '<a onclick="scratch.openHTML.scratchDelete('+ v.id+')">删除</a>' +
                            '</td>' +
                            '</tr>';
                })

                $('#selectmer').html(html);



            },

            add: function(){

                table_obj.rows = new Array();

                var title = '微信互动活动添加';

                E.popup.open({
                    id:'scratchAdd',
                    title: title, //弹出标题，不传则默认为“提示信息”【可选】
                    //content: h,    //显示内容（html代码），不传则默认为空【可选】
                    btnName: "提交", //“确认”按钮，不传则不显示
                    btnCall: "scratch.openHTML.check('')"//点击“确认”按钮触发的函数/方法
                });

                scratch.openHTML.awardSet();

            },

            addLine: function(){

                var message = '';

                if(E.isEmpty($('#ggkname').val()) || $('#ggkname').val() == '奖项名称' )
                    message += '请填写奖项名称<br/>';

                if(!E.isInt($('#awardsRatio').val()))
                    message += '请填写正确概率<br/>';

                if(parseFloat($('#awardsRatio').val())/parseInt($('#awardsRate').val())>1)
                    message += '概率不能大于100%<br/>';

                if(E.isEmpty($('#djcp').val()) || $('#djcp').val() == '奖品名称' )
                    message += '请填写奖品名称<br/>';

                if(!E.isNum($('#pnum').val()))
                    message += '请填写正确奖品数量<br/>';

                if(message != ''){
                    E.alert(message);
                    return false;
                }

                mark++;

                var ggkname = $('#ggkname').val();
                var awardsRatio = $('#awardsRatio').val();
                var awardsRate = $('#awardsRate').val();
                var djcp = $('#djcp').val();
                var pnum = $('#pnum').val();

                $('#ggkname').val('奖项名称');
                $('#ggkname').css('opacity','0.5');
                $('#awardsRatio').val('概率');
                $('#awardsRatio').css('opacity','0.5');
                $('#awardsRate').val('100');
                $('#djcp').val('奖品名称');
                $('#djcp').css('opacity','0.5');
                $('#pnum').val('奖品数量');
                $('#pnum').css('opacity','0.5');

                var lineValue = [ggkname,awardsRatio+'/'+awardsRate,djcp,pnum];

                table_obj.rows.push({'id':mark,'cell':lineValue});

                var html = '<table id="addBox" style="border-collapse: collapse;width:90%">' +
                        '<tr>' +
                        '<th style="width:20%">' +
                        '奖项名称' +
                        '</th>' +
                        '<th style="width:20%">' +
                        '概率' +
                        '</th>' +

                        '<th style="width:20%">' +
                        '奖品名称' +
                        '</th>' +

                        '<th style="width:20%">' +
                        '奖品数量' +
                        '</th>' +

                        '<th style="width:20%">' +
                        '操作' +
                        '</th>' +

                        '</tr>';

                $.each(table_obj.rows,function(k,v){
                    html += '<tr>' +
                            '<td>' +
                            v.cell[0] +
                            '</td>' +
                            '<td>' +
                            v.cell[1] +
                            '</td>' +
                            '<td>' +
                            v.cell[2] +
                            '</td>' +
                            '<td>' +
                            v.cell[3] +
                            '</td>' +
                            '<td align="center">' +
                            '<a onclick="scratch.openHTML.scratchDelete('+ v.id+')">删除</a>' +
                            '</td>' +
                            '</tr>';
                })

                $('#selectmer').html(html);

            },

            actionShow: function(){
                $('#maxNum').css("display","");
                $('#integral').css("display","");
            },

            actionHide: function(){
                $('#maxNum').css("display","none");
                $('#integral').css("display","none");
            },

            showNormal: function(ythis){
                $(ythis).val('');
                $(ythis).css('opacity',1);
            },
            scratchDelete: function(id){

                //删除行对象数据
                $.each(table_obj.rows,function(k,v){
                    if(v!=undefined&& v.id == id){
                        table_obj.rows.splice(k, 1);
                    }
                });

                var html = '<table id="addBox" style="border-collapse: collapse;width:90%">' +
                        '<tr>' +
                        '<th style="width:20%">' +
                        '奖项名称' +
                        '</th>' +
                        '<th style="width:20%">' +
                        '概率' +
                        '</th>' +

                        '<th style="width:20%">' +
                        '奖品名称' +
                        '</th>' +

                        '<th style="width:20%">' +
                        '奖品数量' +
                        '</th>' +

                        '<th style="width:20%">' +
                        '操作' +
                        '</th>' +

                        '</tr>';
                //$("#flex").flexAddData(table_obj);

                $.each(table_obj.rows,function(k,v){
                    html += '<tr>' +
                            '<td>' +
                            v.cell[0] +
                            '</td>' +
                            '<td>' +
                            v.cell[1] +
                            '</td>' +
                            '<td>' +
                            v.cell[2] +
                            '</td>' +
                            '<td>' +
                            v.cell[3] +
                            '</td>' +
                            '<td align="center">' +
                            '<a onclick="scratch.openHTML.scratchDelete('+ v.id+')">删除</a>' +
                            '</td>' +
                            '</tr>';
                })

                $('#selectmer').html(html);


            },


            check: function(promotionID){

                this.promotionID = promotionID;

                var datacacheCop = new Array();

                var addRate = 0;

                console.log(table_obj.rows);

                $.each(table_obj.rows,function(k,v){
                    var addRateArr = new Array();
                    datacacheCop.push(v.cell);
                    addRateArr = v.cell['1'].split('/');
                    addRate += (parseInt(addRateArr[0])/parseInt(addRateArr[1]));
                })

                if(addRate>1){
                    E.alert('奖项概率之和不能大于1');
                    return false;
                }

                this.gloAddRate = addRate;

                datacache = datacacheCop;

                $msg = '';
                if(E.isEmpty($('#promotion_Name').val()))
                    $msg += '标题不能为空<br/>';
                if(E.isEmpty($('#promotion_Type').val()))
                    $msg += '请选择类型<br/>';
                if(E.isEmpty($('#start_Date').val()))
                    $msg += '请选择开始时间<br/>';
                if(E.isEmpty($('#end_Date').val()))
                    $msg += '请选择结束时间<br/>';
                if($('#end_Date').val()<$('#start_Date').val())
                    $msg += "开始时间不能大于结束时间<br/>";
                if(E.isEmpty($('#participateTime').val()) || !E.isInt($('#participateTime').val()))
                    $msg += '请输入正确的每日次数<br/>';
                if(E.isEmpty($('#acceptEndDate').val()))
                    $msg += '请选择领奖结束日期<br/>';

                if($('input[name="is_PointsExchange"]').get(0).checked){

                    if(!E.isInt($('#maxExchangeTime').val()))
                        $msg += '请输入正确的最大次数<br/>';
                    if(!E.isNum($('#point').val()))
                        $msg += '请输入正确的积分<br/>';

                }

                if(datacache.length == 0)
                    $msg += '请添加奖项设置<br/>';

                if(this.gloAddRate>100)
                    $msg += '奖项设置概率之和不能大于100%<br/>';

                if($msg != ''){
                    E.alert($msg);
                    return false;
                }

                E.confirm("您确认要保存该微信互动活动么？", "scratch.openHTML.saveScratch");
            },

            saveScratch: function(){

                E.loadding.open("正在保存微信互动活动，请稍候...");

                var dt = E.getFormValues('set_form');
                var url = '';

                if(this.promotionID){
                    url = '/invokingAjax-backend/promotion/scratch.ajax?operFlg=3&promotionID='+this.promotionID;
                }else{
                    url = '/invokingAjax-backend/promotion/scratch.ajax?operFlg=2';//保存
                }


                E.ajax_post({
                    url: url,
                    data: {'dt':dt,'datacache':datacache,'addRate':this.gloAddRate},
                    call: "scratch.openHTML.result"
                });
            },

            result: function(o){

                E.loadding.close();
                if (o.code == 200) {
                    table_obj.rows = new Array();
                    E.alert(o.message,2,'scratch.openHTML.closeLoad');

                } else {
                    E.alert(o.message);
                }
            },
            closeLoad: function(){
                scratch.load();
                if(this.promotionID){
                    E.popup.close();
                }

                $('#promotion_Name').val('');
                $('#promotion_Type').val('');
                $('#start_Date').val('');
                $('#end_Date').val('');
                $('#participateTime').val('');
                $('#acceptEndDate').val('');
                $('#maxExchangeTime').val('');
                $('#maxNum').css('display','none');
                $('#integral').css('display','none');
                $('#maxExchangeTime').val('');
                $('#point').val('');
                $('#pchang').html('<div>' +
                        '<input onclick="scratch.openHTML.actionShow()" type="radio" name="is_PointsExchange" value="1">&nbsp;是&nbsp;' +
                        '<input onclick = "scratch.openHTML.actionHide()" type="radio" name="is_PointsExchange" checked="checked" value="0">&nbsp;否' +
                        '</div>');
                $('#selectmer').empty();
            }
        },

        save: function(){
            E.open('/quanliadmin/app/promotion/scratch.pscript?operFlg=2');
        },
        edit: function(promotionID){
            E.open('/quanliadmin/app/promotion/scratch.pscript?operFlg=2&promotionID='+promotionID);
        },
        search: function(){
			if($('#startDate').val()>$('#endDate').val()){
                E.alert('开始时间大于结束时间');
                return false;
            }
            var dt = $('#searchForm').serializeArray();
            $("#flex").flexOptions({params: dt}).flexReload();
        },

        clear: function(){
            $('#promotionName').val('');
            $('#promotionType').val('');
            $('#startDate').val('');
            $('#endDate').val('');
            $('#isPointsExchange').val('');
        },
        load: function() {
            $("#flex").flexReload();
        },
        doAction:function(promotionID,useFlg){

            this.p = promotionID;

            this.u = useFlg;

            var usemessage = '';
            if(useFlg == 1){
                scratch.confirmUse();
            }else{
                usemessage = '您确认要禁用该微信互动活动吗？';
                E.confirm(usemessage,'scratch.confirmUse')
            }

        },

        confirmUse: function(){

            E.ajax_post({
                url: '/invokingAjax-backend/promotion/scratch.ajax?operFlg=4',
                data: {'promotionID':this.p,'useFlg':this.u},
                call: "scratch.result"
            });

        },
        result: function(o){
            if(o.code == 200){
                E.alert(o.message,2);
                scratch.load();
            }else{
                E.alert(o.message);
            }
        },
        deleteConfrim:function(){
            if ($(".trSelected").length == 0) {
                E.alert("请选择要删除的微信互动活动");
            } else {
                E.confirm("您确认要删除选择的微信互动活动吗？", "scratch.deleteScratch");
            }
        },
        deleteScratch: function(){
            var pidArr = new Array();
            $('.trSelected').each(function(k,v){
                var id = $(v).attr("id").replace("row", "");
                pidArr.push(id);
            })

            console.log(pidArr);

            E.ajax_post({
                url: '/invokingAjax-backend/promotion/scratch.ajax?operFlg=5',
                data: {'pid':pidArr},
                call: "scratch.resultDelete"
            });
        },
        resultDelete: function(o){

            if(o.code == 200){
                E.alert(o.message,2);
                scratch.load();
            }else{
                E.alert(o.message);
            }
        },
        drawRecord: function(promotionID){

            E.open('/quanliadmin/app/promotion/drawRecord.pscript?operFlg=1&promotionID='+promotionID);

        },
        winRecord: function(promotionID){
            E.open('/quanliadmin/app/promotion/winRecord.pscript?operFlg=1&promotionID='+promotionID);
        },
        countAnalysis: function(promotionID){
            E.open('/quanliadmin/app/promotion/countAnalysis.pscript?operFlg=1&promotionID='+promotionID, "", {height: 600,width: 1024, top: 50, left: 150});
        }
    }


</script>

<div style="display:none">
    <div id="scratchAdd">
        <form id="set_form">

            <table>
                <tbody>

                <tr>
                    <!--<td class="tar" width="150">标题：</td>
                    <td width="*">
                        <div>
                            <input name="promotion_Name" id="promotion_Name" type="text" >
                        </div>
                    </td>-->
                    <div class="input-group input-group-lg">
                        <span class="input-group-addon">标题：</span>
                        <input type="text" class="form-control" name="promotion_Name" id="promotion_Name"  />
                    </div>

                </tr>
                <tr>
                    <div class="input-group input-group-lg">
                        <span class="input-group-addon">类型：</span>
                        <span class="input-group-radio">
                            <div id="selectOption">
                                <select name="promotion_Type" id="promotion_Type">
                                    <option  value="">请选择</option>
                                    <option  value="1">刮刮卡</option>
                                    <option  value="2">摇一摇</option>
                                    <option  value="3">大转盘</option>
                                    <option  value="4">盖高楼</option>
                                    <option  value="5">接红包</option>
                                </select>
                            </div>
                        </span>
                    </div>

                </tr>
                <tr>
                    <!--<td class="tar" width="150">有效期：</td>
                    <td width="*">
                       <div>
                            <input id="start_Date" onfocus="scratch.openHTML.selectTime()" type="text" readonly="" size="10"  name="start_Date">
                            ～
                            <input id="end_Date" onfocus="scratch.openHTML.selectTime()"  type="text" readonly=""  size="10" name="end_Date">
                        </div>
                    </td>-->
                    <div class="input-group input-group-lg">
                        <span class="input-group-addon">有效期：</span>
                        <span class="input-group-radio">
                            <div>
                                <input id="start_Date"  type="text" readonly="" size="10"  name="start_Date">
                                ～
                                <input id="end_Date"  type="text" readonly=""  size="10" name="end_Date">
                            </div>
                        </span>
                    </div>
                </tr>
                <tr>
                    <!--<td class="tar" width="150">每日次数：</td>
                    <td width="*">
                        <div>
                            <input name="participateTime" id="participateTime" type="text" value="">
                        </div>
                    </td>-->
                    <div class="input-group input-group-lg">
                        <span class="input-group-addon">每日次数：</span>
                        <input type="text" class="form-control" name="participateTime" id="participateTime"/>
                    </div>
                </tr>
                <tr>
                    <!--<td class="tar" width="150">领奖结束日期：</td>
                    <td width="*">
                        <div>
                            <input name="acceptEndDate" id="acceptEndDate" type="text" value="">
                        </div>
                    </td>-->
                    <div class="input-group input-group-lg">
                        <span class="input-group-addon">领奖结束日期：</span>
                        <input type="text" class="form-control" name="acceptEndDate" id="acceptEndDate"/>
                     </div>

                </tr>
                <tr>
                   <!-- <td class="tar" width="150">积分换次数：</td>
                    <td width="*">
                        <div id="pchang">
                            <div>
                            <input onclick="scratch.openHTML.actionShow()" type="radio" name="is_PointsExchange" value="1">&nbsp;是&nbsp;
                            <input onclick = "scratch.openHTML.actionHide()" type="radio" name="is_PointsExchange" checked="checked" value="0">&nbsp;否
                            </div>
                        </div>
                    </td>-->
                    <div class="input-group input-group-lg">
                        <span class="input-group-addon">积分换次数：</span>
                         <span class="input-group-radio">
                             <div id="pchang">
                                 <div>
                                     <input onclick="scratch.openHTML.actionShow()" type="radio" name="is_PointsExchange" value="1">&nbsp;是&nbsp;
                                     <input onclick = "scratch.openHTML.actionHide()" type="radio" name="is_PointsExchange" checked="checked" value="0">&nbsp;否
                                 </div>
                             </div>
                         </span>
                    </div>
                </tr>
                <tr id = "maxNum" style="display:none">
                    <!--<td class="tar" width="150">最大次数：</td>
                    <td width="*">
                        <div>
                            <input name="maxExchangeTime" id="maxExchangeTime" type="text"  value="">
                        </div>
                    </td>-->
                    <div id = "maxNum" style="display:none" class="input-group input-group-lg">
                        <span class="input-group-addon">最大次数：</span>
                        <input type="text" class="form-control" name="maxExchangeTime" id="maxExchangeTime"/>
                    </div>
                </tr>
                <tr id="integral" style="display:none">
                    <!--<td class="tar" width="150">积分：</td>
                    <td width="*">
                        <div>
                            <input name="point" id="point" type="text"  value="">
                        </div>
                    </td>-->
                    <div id="integral" style="display:none" class="input-group input-group-lg">
                        <span class="input-group-addon">积分：</span>
                        <input type="text" class="form-control" name="point" id="point"/>
                    </div>
                </tr>
                <tr>
                    <!--<td class="tar" width="150">奖项设置：</td>
                    <td width="*">
                        <div>
                            <input id="ggkname" style="opacity:0.5;width:100px" type="text" value="奖项名称">
                            <input id="awardsRatio" style="opacity:0.5;width:60px" type="text"  value="概率"> /
                            <select id="awardsRate">
                                <option value="100">100</option>
                                <option value="1000">1000</option>
                                <option value="10000">10000</option>
                            </select>
                            <input id="djcp" style="opacity:0.5;width:100px" type="text"  value="奖品名称">
                            <input id="pnum" style="opacity:0.5;width:80px" type="text"  value="奖品数量">
                            <input class="btn" type="button" onclick="scratch.openHTML.addLine()" value="添加">
                        </div>
                    </td>-->
                    <div class="input-group input-group-lg">
                        <span class="input-group-addon">奖项设置：</span>
                        <span class="input-group-radio">
                            <br/>
                            <div>
                                <input id="ggkname" style="opacity:0.5;width:100px" type="text" value="奖项名称">
                                <input id="awardsRatio" style="opacity:0.5;width:60px" type="text"  value="概率"> /
                                <select id="awardsRate">
                                    <option value="100">100</option>
                                    <option value="1000">1000</option>
                                    <option value="10000">10000</option>
                                </select>
                                <input id="djcp" style="opacity:0.5;width:100px" type="text"  value="奖品名称">
                                <input id="pnum" style="opacity:0.5;width:80px" type="text"  value="奖品数量">
                                <input class="btn" type="button" onclick="scratch.openHTML.addLine()" value="添加">
                            </div>

                            <div id = 'selectmer' style="width:550px;margin-top: 18px;">
                            </div>

                            <br/>

                        </span>
                    </div>
                </tr>
                <tr>
                    <!--<td>&nbsp;</td>
                    <td>
                        <div id = 'selectmer' style="width:550px;margin-top: 18px;">
                        </div>
                    </td>-->

                    <!--<div class="input-group input-group-lg">
                        <span class="input-group-addon">&nbsp;</span>
                        <span class="input-group-radio">
                            <div id = 'selectmer' style="width:550px;margin-top: 18px;">
                            </div>
                        </span>
                    </div>-->

                </tr>
                </tbody>
            </table>

        </form>
    </div>
</div>

</body>
</html>